projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f5783c
)
(read_avail_input): Make cbuf 1 char shorter.
author
Richard M. Stallman
<rms@gnu.org>
Mon, 15 Nov 1993 12:28:01 +0000
(12:28 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Mon, 15 Nov 1993 12:28:01 +0000
(12:28 +0000)
src/keyboard.c
patch
|
blob
|
history
diff --git
a/src/keyboard.c
b/src/keyboard.c
index 249c594d2a8082364b90dd9379e92fd8bc6612e3..47092b339fec743addfdd0330c29689fdf6040d7 100644
(file)
--- a/
src/keyboard.c
+++ b/
src/keyboard.c
@@
-3027,7
+3027,10
@@
read_avail_input (expected)
nread = (*read_socket_hook) (0, buf, KBD_BUFFER_SIZE, expected, expected);
else
{
- unsigned char cbuf[KBD_BUFFER_SIZE];
+ /* Using KBD_BUFFER_SIZE - 1 here avoids reading more than
+ the kbd_buffer can really hold. That may prevent loss
+ of characters on some systems when input is stuffed at us. */
+ unsigned char cbuf[KBD_BUFFER_SIZE - 1];
#ifdef FIONREAD
/* Find out how much input is available. */